package Map;

import java.util.Collections;
import java.util.List;
import java.util.Objects;

public class Test1 {
    public static void main(String[] args) {
        BinarySearchTree binarySearchTree = new BinarySearchTree(10);
        try {
            binarySearchTree.insert(20);
            binarySearchTree.insert(5);
            binarySearchTree.insert(6);
            binarySearchTree.insert(15);
            binarySearchTree.insert(31);
        } catch (BinarySearchTreeInsertException e) {
            e.printStackTrace();
        }
        List<Integer> list = binarySearchTree.inOrder(binarySearchTree.root);
        int size = list.size();
        for (int i = 0; i < size; i++) {
            System.out.print(list.get(i));
            if (i != size - 1){
                System.out.print(" > ");
            }
        }

    }
}
